/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.minam.beans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Alvaro
 */
@Entity
@Table(name = "SCATBP_CARGO")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ScatbpCargo.findAll", query = "SELECT s FROM ScatbpCargo s"),
    @NamedQuery(name = "ScatbpCargo.findByIdCargo", query = "SELECT s FROM ScatbpCargo s WHERE s.idCargo = :idCargo"),
    @NamedQuery(name = "ScatbpCargo.findByVNomCrg", query = "SELECT s FROM ScatbpCargo s WHERE s.vNomCrg = :vNomCrg"),
    @NamedQuery(name = "ScatbpCargo.findByVNomCorto", query = "SELECT s FROM ScatbpCargo s WHERE s.vNomCorto = :vNomCorto")})
public class ScatbpCargo implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_CARGO")
    private BigDecimal idCargo;
    @Size(max = 100)
    @Column(name = "V_NOM_CRG")
    private String vNomCrg;
    @Size(max = 30)
    @Column(name = "V_NOM_CORTO")
    private String vNomCorto;

    public ScatbpCargo() {
    }

    public ScatbpCargo(BigDecimal idCargo) {
        this.idCargo = idCargo;
    }

    public BigDecimal getIdCargo() {
        return idCargo;
    }

    public void setIdCargo(BigDecimal idCargo) {
        this.idCargo = idCargo;
    }

    public String getVNomCrg() {
        return vNomCrg;
    }

    public void setVNomCrg(String vNomCrg) {
        this.vNomCrg = vNomCrg;
    }

    public String getVNomCorto() {
        return vNomCorto;
    }

    public void setVNomCorto(String vNomCorto) {
        this.vNomCorto = vNomCorto;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCargo != null ? idCargo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ScatbpCargo)) {
            return false;
        }
        ScatbpCargo other = (ScatbpCargo) object;
        if ((this.idCargo == null && other.idCargo != null) || (this.idCargo != null && !this.idCargo.equals(other.idCargo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.com.minam.beans.ScatbpCargo[ idCargo=" + idCargo + " ]";
    }
    
}
